define('fromReceptionByrequire',['text!../tpl/from-receptionByrequire.html','tool','common'],function(Template,tool,common){
    var App ={
    	template:Template,
    	mixins: [tool.toor,common.common],
    	mounted:function(){
    		var _this=this;
    	},
    	data:function(){
    		return{
    			num:0,
    			submitJson:{
				    "component": [
					    {
	    			   	  "name":"接待地点",
	    			   	  "value":''
	    			   },
	    			   {
	    			   	   "name": "接送时间",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "接送地点",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "客人姓名",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "联系方式",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "欢迎词位置",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "播放时间",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "客户最高职位、名称",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "公司名称",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "参会人数",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "会议时间",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "5、会议室路线指引",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "6、会议设备需求",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "8、是否需要参观公司",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "9、行政下楼接待客人",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "10、摄像需求",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "用餐人数",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "用餐时间",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "用餐地点",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "特殊需求",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "房间数",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "酒店名称",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "特殊要求",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "13、行政人事欢送下楼",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "送客时间",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "送客地点",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "离开客人姓名",
					       "value": ''
	    			   },
	    			   {
	    			   	   "name": "客人联系方式",
					       "value": ''
	    			   }
				    ]
				}
    			
    		};
    	},
    	watch:{
    	
    	},
    	methods:
    	{
    		typeFnA:function(data){
    			this.submitJson.component[5].value=data.join(';');
    		},
    		typeFnB:function(){
    			this.submitJson.component[12].value=data.join(';');
    		},
    		repeatFn:function(data)
    		{
		     	if(data && data.length>0)
		     	{
		     	    for(var i=0;i<this.submitJson.component.length;i++)
		     	    {
		     	    	 var o=this.submitJson.component[i];
		     	    	 if(o.name=="接客车辆需求")
		     	    	 {
		     	    	 	this.submitJson.component.splice(i,1)
		     	    	 }
		     	    };
		     		this.submitJson.component.push({
		     			  "name":"接客车辆需求",
		     			  "value":JSON.stringify(data)
		     		});
		     	}
    		
    		},
    		repeatFnB:function(data)
    		{
		     	if(data && data.length>0)
		     	{
		     	    for(var i=0;i<this.submitJson.component.length;i++)
		     	    {
		     	    	 var o=this.submitJson.component[i];
		     	    	 if(o.name=="参会人员台牌")
		     	    	 {
		     	    	 	this.submitJson.component.splice(i,1)
		     	    	 }
		     	    };
		     		this.submitJson.component.push({
		     			  "name":"参会人员台牌",
		     			  "value":JSON.stringify(data)
		     		});
		     	}
    		
    		},
    		repeatFnC:function(data)
    		{
		     	if(data && data.length>0)
		     	{
		     		this.num=0;
		     		for(var i=0;i<data.length;i++)
		     		{
		     			if(data[i][1].value==''){
		     				data[i][1].value=0;
		     			}
		     			this.num+=parseFloat(data[i][1].value);
		     		}
		     	    for(var i=0;i<this.submitJson.component.length;i++)
		     	    {
		     	    	 var o=this.submitJson.component[i];
		     	    	 if(o.name=="茶水、果盘明细")
		     	    	 {
		     	    	 	this.submitJson.component.splice(i,1)
		     	    	 }
		     	    };
		     		this.submitJson.component.push({
		     			  "name":"茶水、果盘明细",
		     			  "value":JSON.stringify(data)
		     		});
		     	}
    		
    		},
    		repeatFnD:function(data)
    		{
		     	if(data && data.length>0)
		     	{
		     	    for(var i=0;i<this.submitJson.component.length;i++)
		     	    {
		     	    	 var o=this.submitJson.component[i];
		     	    	 if(o.name=="送客车辆需求")
		     	    	 {
		     	    	 	this.submitJson.component.splice(i,1)
		     	    	 }
		     	    };
		     		this.submitJson.component.push({
		     			  "name":"送客车辆需求",
		     			  "value":JSON.stringify(data)
		     		});
		     	}
    		
    		}
    	}
    };
    return {
        app:App       
    };
});